@import be.objectify.deadbolt.scala.AuthenticatedRequest
@import security._
@import be.objectify.deadbolt.scala.models.PatternType
@import be.objectify.deadbolt.scala.views.html._
@(handler: be.objectify.deadbolt.scala.DeadboltHandler)(implicit request: AuthenticatedRequest[Any])

<div class="row-fluid" id="template-pattern">
    <div class="span10">
        <h3 class="subsection">pattern</h3>

        <p>pattern allows you to use regular expressions to determine access.</p>
    </div>
</div>
<div class="row-fluid">
    <div class="span3 columnHeader">Unprotected content</div>
    <div class="span5 columnHeader">Specification</div>
    <div class="span2 columnHeader">Result</div>
</div>

<div class="row-fluid">
    <div class="span3">
        <pre>This content should be visible</pre>
    </div>
    <div class="span5">
        <pre>
@@pattern(handler, "printers.edit") {
  This content should be visible
}</pre>
    </div>
    <div class="span2">
        @pattern(handler, "printers.edit") {
        This content should be visible
        }
    </div>
</div>

<div class="row-fluid">
    <div class="span3">
        <pre>This content should NOT be visible</pre>
    </div>
    <div class="span5">
        <pre>
@@pattern(handler, "printers.foo") {
  This content should not visible
}</pre>
    </div>
    <div class="span2">
        @pattern(handler, "printers.foo") {
        This content should NOT be visible
        }
    </div>
</div>


<div class="row-fluid">
    <div class="span3">
        <pre>This content should be visible</pre>
    </div>
    <div class="span5">
        <pre>
@@pattern(handler, "(.)*\\.edit", PatternType.REGEX) {
  This content should be visible
}</pre>
    </div>
    <div class="span2">
        @pattern(handler, "(.)*\\.edit", PatternType.REGEX) {
        This content should be visible
        }
    </div>
</div>

<div class="row-fluid">
    <div class="span3">
        <pre>This content should NOT be visible</pre>
    </div>
    <div class="span5">
        <pre>
@@pattern(handler, "(.)*\\.foo", PatternType.REGEX) {
  This content should NOT be visible
}</pre>
    </div>
    <div class="span2">
        @pattern(handler, "(.)*\\.foo", PatternType.REGEX) {
                This content should NOT be visible
        }
    </div>
</div>
